#include<stdio.h>

/**
 * 用于把 10 进制数 转换为 二进制
 */
void toBin(int current, int num)
{

    if (current == 0)
    {
        return;
    }

    int next = current >> 1;

    if (num >= current)
    {
        printf("1");
        toBin(next, num - current);
    }
    else
    {
        printf("0");
        toBin(next, num);
    }
}